package com.pmcc.cj.entity;

import com.pmcc.core.entity.UUIDEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 云飞防自有商品
 * Created by tomas on 2020/9/12.
 */
@Entity
@Table(name = "cj_commodity_yun")
public class CjCommodityYun extends UUIDEntity {
    @Column(name = "name")
    private String name;//名称
    @Column(name = "product_id")
    private String productId;//商品分类id   如：小麦、玉米、花生等
    @Column(name = "product_name")
    private String productName; //分类名称
    @Column(name = "type_id")
    private String typeId;//药剂分类    如：杀虫、杀菌、除草等
    @Column(name = "type_name")
    private String typeName;//  药剂分类名称
    @Column(name = "price")
    private BigDecimal price;//商品成本价
    @Column(name = "address")
    private String address;//商品缩略图地址
    @Column(name = "address_detail")
    private String addressDetail;//商品详情页图

    @Column(name = "control_object")
    private String controlObject;//防治对象
    @Column(name = "performance_characteristics")
    private String performanceCharacteristics;//性能特点
    @Column(name = "instructions")
    private String instructions;//使用方法


    @Column(name = "product_image_desc",length = 1000)
    private String productImageDesc;//商品图文介绍
    @Column(name = "create_time")
    private Date createTime;//创建时间
    //商品状态  0：上架    1：下架
    @Column(name = "fettle")
    private Integer fettle;
    //商品状态  0：不推荐    1：推荐
    @Column(name = "is_dashboard")
    private Integer isDashboard;
    @Column(name = "origin")
    private String origin;//产地
    @Column(name = "score")
    private Integer score;//已买出的个数

    @Transient
    private List<CjCommodityYunDetail> details;

    public List<CjCommodityYunDetail> getDetails() {
        return details;
    }

    public void setDetails(List<CjCommodityYunDetail> details) {
        this.details = details;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getControlObject() {
        return controlObject;
    }

    public void setControlObject(String controlObject) {
        this.controlObject = controlObject;
    }

    public String getPerformanceCharacteristics() {
        return performanceCharacteristics;
    }

    public void setPerformanceCharacteristics(String performanceCharacteristics) {
        this.performanceCharacteristics = performanceCharacteristics;
    }

    public String getInstructions() {
        return instructions;
    }

    public void setInstructions(String instructions) {
        this.instructions = instructions;
    }

    public String getProductImageDesc() {
        return productImageDesc;
    }

    public void setProductImageDesc(String productImageDesc) {
        this.productImageDesc = productImageDesc;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getFettle() {
        return fettle;
    }

    public void setFettle(Integer fettle) {
        this.fettle = fettle;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Integer getIsDashboard() {
        return isDashboard;
    }

    public void setIsDashboard(Integer isDashboard) {
        this.isDashboard = isDashboard;
    }

    public String getAddressDetail() {
        return addressDetail;
    }

    public void setAddressDetail(String addressDetail) {
        this.addressDetail = addressDetail;
    }
}
